/*******************************************************************/
/*                       Author: gz                                */
/*                 Contact: gz_robot@outlook.com                   */
/*                   First version: 2019-04-16                     */
/*                    Last update: 2019-05-21                      */
/*******************************************************************/
#ifndef CLASS_BOUNDING_BOX_H
#define CLASS_BOUNDING_BOX_H
// include personal lib.
#include <ros/ros.h>
#include "msg_lidar_prep/msg_lidar_prep.h"
#include "msg_lidar_prep/LidarPoints.h"
#include "msg_lidar_shape/DetectedObject.h"
#include <vector>

namespace lidar
{

namespace obj

{

class BoundingBoxModel
{
private:
  double CalcClosenessCriterion(const std::vector<double> &c_1, const std::vector<double> &c_2);
  //    ros::NodeHandle nh_line;
  //    ros::Publisher pub_line;
  //    ros::Subscriber sub_line;

public:
  BoundingBoxModel() {}

  ~BoundingBoxModel() {}

  /*
     * minimum cluster size is 2.
     */
  bool estimate(const msg_lidar_prep::msg_lidar_prep &cluster, msg_lidar_shape::DetectedObject &output);
};
} // namespace obj
} // namespace lidar
#endif // CLASS_BOUNDING_BOX_H
